<?php

$arr = [10,45,67,89,56,5];
$arr[1] = 88;
$arr[99] = 90;


$arr = [['小明','男','18'],['小红','女','20']];

$arr = [
	[
		'name'=>'小明',
		'sex'=>'男',
		'age'=>'18'
	],
	[
		'name'=>'小红',
		'sex'=>'女',
		'age'=>'20'
	]
];

$user = [
	'name'=>'小明',
	'sex'=>'男',
	'age'=>'18'
];

$user['phone'] = '18925139194';

// var_dump($user);

var_dump($arr);

// foreach ($arr as $sss => $ddd) {
// 	var_dump($k);
// 	var_dump($v);
// }

$arr = [[45,4,52,34,234],[45,45,4,54,5,45]];

1 求多维数组的和

$arr = [35,34,53,45,345,2,2]

2  找出数组 的最大值 

3  把1-100之间的奇数装到一个数组中

4 计算数组中最大数和最小数的差 [45,45,1,3,434,34,34]

?>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<table border="1">
		<tr>
			<td>姓名</td>
			<td>性别</td>
			<td>年龄</td>
		</tr>
		<?php for($i=0;$i<=1;$i++){ ?>
			<tr>
				<td><?php echo $arr[$i]['name']; ?></td>
				<td><?php echo $arr[$i]['sex']; ?></td>
				<td><?php echo $arr[$i]['age']; ?></td>
			</tr>
		<?php } ?>

		<?php foreach ($arr as $user) { ?>
			<tr>
				<td><?php echo $user['name']; ?></td>
				<td><?php echo $user['sex']; ?></td>
				<td><?php echo $user['age']; ?></td>
			</tr>
		<?php } ?>
	</table>
</body>
</html>